﻿using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace NConfigGenerator
{
    public sealed class ElementConfigNode : ConfigNode
    {
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly ConfigNodeCollection _children = new ConfigNodeCollection();

        public ElementConfigNode(ConfigNode parent, string name)
            : base(parent, name)
        {
        }

        [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
        public ConfigNodeCollection Children
        {
            [DebuggerStepThrough]
            get { return _children; }
        }

        public override IEnumerable<ConfigNode> AllChildren
        {
            get { return _children; }
        }
    }
}